package com.lin.service;

import com.lin.remote.MapDirectionClient;
import com.lzl.responese.DirectionResponese;
import com.lzl.responese.ResponseResult;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * //TODO
 *
 * @author zhaolinlin
 * @description //TODO
 * @createTime 2022/8/18 22:13
 */
@Service
@Slf4j
public class DirectionService {

    @Autowired
    MapDirectionClient mapDirectionClient;

    public ResponseResult<DirectionResponese> driving(String depLongitude,String depLatitude,String destLongitude,String destLatitude){
        //调用第三方地图接口
        DirectionResponese direction = mapDirectionClient.direction(depLongitude, depLatitude, destLongitude, destLatitude);
        return ResponseResult.success(direction);
    }

}
